feat(Storage): add support for Bucket IP filter configuration#9286
Open
salilg-eng wants to merge 3 commits into
Open
feat(Storage): add support for Bucket IP filter configuration#9286salilg-eng wants to merge 3 commits into
salilg-eng wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Bucket IP Filters to the PHP Cloud Storage client library. This lets developers restrict bucket access to specific IP addresses or VPC networks, which is a big win for security.
Changes :
Schema: Updated
storage-v1.jsonwith theipFilterdefinition (covering mode, public/VPC sources, and service agent access) so the REST client handles serialization correctly.Documentation: Added the
$ipFilterarray structure to the docblocks forStorageClient::createBucket()andBucket::update().System Tests: Added comprehensive E2E verification in
ManageBucketsTest.phpunder the@group bucket-ipfiltertag. This covers CRUD operations, invalid CIDR handling, and safely confirms403 Forbiddendenials for unauthorized access.Unit Tests: Added extensive unit test coverage in
StorageClientTest.phpandBucketTest.phpto ensure the new configuration passes perfectly through the client down to the underlying connections.